﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

using SMA = System.Management.Automation;

namespace RSPowershell
{
    [System.Management.Automation.Cmdlet("Get", "RSItem")]
    public class Get_RSItem : SMA.Cmdlet
    {
        [SMA.Parameter(Mandatory = true, Position = 0)]
        public string Path;

        protected override void ProcessRecord()
        {
            var rep_svc = this.ConnectToReportingService();
            var rep_exec_svc = this.ConnectToReportExecutionService();

            var children = rep_svc.ListChildren(this.Path, false);
            this.WriteObject(children,true);
        }
    }


}
